"""multiprocessing.Manager.Queue()"""
# encoding=utf-8
import time
from multiprocessing import Pool, Queue, Process
import multiprocessing


def func(q):
    print('*' * 30)
    q.put('1111')


if __name__ == "__main__":
    m = multiprocessing.Manager()
    queue = m.Queue()
    pool = Pool(4)  # 生成一个容量为4的进程池
    for i in range(5):
        pool.apply_async(func, (queue,))  # 向进程池提交目标请求
    pool.close()
    pool.join()

    print(queue.qsize())
